import { useMemo } from 'react';
import Cls from 'classnames';
import { Spin, Tabs } from 'antd';
import pageStyles from '@/common/pageLayout.less';
import { CommonFunctionTable } from './CommonFunctionTable';
import '../common/styles.less';
export const CommonFunctionView = ({ curRes }) => {
  const styleFixCls = 'common-function';

  const tabsItem = useMemo(() => {
    return [
      {
        label: '常用功能',
        key: '1',
        children: <CommonFunctionTable curRes={curRes} />,
        isShow: true,
      },
    ];
  }, [curRes]);

  return (
    <div className={Cls(`${styleFixCls}`, pageStyles['commonTabsLine'])} style={{ borderRadius: '10px' }}>
      <Spin spinning={false}>
        <Tabs items={tabsItem} />
      </Spin>
    </div>
  );
};
